<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<% String ctxPath = request.getContextPath(); %>

 <script language="JavaScript">
    function selectNode()
    {
		with (document.categoryBrowserForm) {
          var result = "OID=<bean:write name="categoryBrowserForm"
                     property="currentNodeId"
                     filter="true" />&PATH=<bean:write
                     name="categoryBrowserForm"
                     property="currentCategoryPath" filter="true" />";
        
          if (<bean:write name="categoryBrowserForm"
		      property="currentNodeId"
		      filter="true" />==-1) { 
                alert('<bean:message key="bp.process.categoryBrowser.alert.noSelection" bundle="bp.messages"/>');
                return true;
          }

          elements["param"].value = result;
          submit();
        }
    }
    
    function doCancel()
    {
		with (document.categoryBrowserForm) {
          elements["param"].value = "cancel";
          submit();
        }
    }

 </script>

<%
   java.util.HashMap map= new java.util.HashMap();
   String contentTypeId = request.getParameter("contentTypeId");
   map.put("contentTypeId",contentTypeId);
   String includeContent = request.getParameter("includeContent");
   if (includeContent!=null) map.put("includeContent",contentTypeId);
   pageContext.setAttribute("pagetabParam",map);
%>

 <html:form action="bp/categoryBrowserReinit.do" method="post">
 <html:hidden name="categoryBrowserForm" property="param"/>

  <table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
		<tr>
		  <td valign="top" width="100%">
		    
		<div class="generalWrapRight"> 
        <input type=hidden value="<bean:write name="categoryBrowserForm"
         property="contentTypeName" filter="true" /> " name="contentTypeId">
        <input class=inputButton onClick="doCancel()" type=button
         value='<bean:message key="button.close" bundle="bp.messages"/>'>
        </div>
        <div><%@include file="/mc/common/pagetab.jsp" %></div>		
        <div class="pageSubtitle">
		  <span class="left"><bean:write name="categoryBrowserForm"
    property="contentTypeFriendlyName" filter="true" />&nbsp;<bean:message key="bp.process.categoryBrowser.unclassified.pageSubtitle" bundle="bp.messages"/>
          </span>
	    </div>
	
	  <table class="labelForm" border="0" cellspacing="1" cellpadding="2" summary="<bean:message key="bp.process.categoryBrowser.summery" bundle="bp.messages"/>" width="100%">
		<tr>
		  <td class="labelField">
        <logic:iterate name="categoryBrowserForm" property="categoryList"
              id="catView" indexId="index"
              type="com.broadvision.process.tools.action.categorybrowser.CategoryInfo">
          <div style="text-indent:0px">
            <a href="<bean:write name="catView" property="selectionLink" 
               filter="true" />" 
               class="<bean:write name="catView" property="selectStatus"
               filter="true" />">
              <bean:write name="catView" property="categoryName" filter="true"/>
              <logic:match name="catView" property="selectStatus"
               value="current">
               <img src="<%= ctxPath %>/bp/images/icons/node_current.gif" 
                width="8" height="9" border="0" 
                alt="<bean:message key="bp.process.categoryBrowser.alt.currentCategory" bundle="bp.messages"/>"
                title="<bean:message key="bp.process.categoryBrowser.alt.currentCategory" bundle="bp.messages"/>"
                hspace="2" align="absbottom"/>
              </logic:match>
            </a>
        </div>
      </logic:iterate>
     </td>
    </tr>
  </table>
      <div class="pageButtonWrap" align="right">
        <input class=inputButton onClick="doCancel()" type=button
         value='<bean:message key="button.cancel" bundle="bp.messages"/>'>
        <input class=inputButton onClick="return selectNode()" type=button
         value='<bean:message key="button.select" bundle="bp.messages"/>'>
      </div>
	 </td>
    </tr>
  </table>
 </html:form>
